/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.ts.dao;

import java.util.Collection;
import java.util.List;

import com.xy.biz.ts.domain.po.ExaminationRecordQuestionPO;
import com.xy.biz.ts.domain.query.ExaminationRecordQuestionQuery;

/**
 *
 *
 * @author yzh
 * @date 2021-4-6
 */
public interface ExaminationRecordQuestionDao {

	/**
	 * 保存
	 *
	 * @param examinationRecordQuestionPO
	 */
	int saveExaminationRecordQuestion(ExaminationRecordQuestionPO examinationRecordQuestionPO);

	/**
	 * 保存多个
	 *
	 * @param collection
	 */
	int saveAllExaminationRecordQuestion(Collection<ExaminationRecordQuestionPO> collection);

	/**
	 * 保存多个未修改的
	 *
	 * @param collection
	 */
	int saveAllExaminationRecordQuestionUnmodified(Collection<ExaminationRecordQuestionPO> collection);

	/**
	 * 更新
	 *
	 * @param examinationRecordQuestionPO
	 */
	int updateExaminationRecordQuestion(ExaminationRecordQuestionPO examinationRecordQuestionPO);

	/**
	 * 删除
	 *
	 * @param examinationRecordQuestionId
	 */
	int deleteExaminationRecordQuestion(Long examinationRecordQuestionId);

	/**
	 * 查找一个
	 *
	 * @param examinationRecordQuestionId
	 * @return
	 */
	ExaminationRecordQuestionPO getExaminationRecordQuestion(Long examinationRecordQuestionId);

	/**
	 * 查找多条
	 *
	 * @param collection
	 * @return
	 */
	List<ExaminationRecordQuestionPO> listExaminationRecordQuestionById(Collection<Long> collection);

	/**
	 * 条件查找多条
	 *
	 * @param query 查找条件
	 * @return
	 */
	List<ExaminationRecordQuestionPO> listExaminationRecordQuestion(ExaminationRecordQuestionQuery query);

	/**
	 * 条件统计个数
	 *
	 * @param query 查找条件
	 * @return
	 */
	int countExaminationRecordQuestion(ExaminationRecordQuestionQuery query);


	/**
	 * 批量修改试卷试题数据
	 * @param collection
	 * @return
	 */
    int updateExaminationRecordQuestionList(List<ExaminationRecordQuestionPO> collection);

	/**
	 * 查询试卷总分数
	 * @param examinationRecordId
	 * @return
	 */
	int countExaminationRecordScore(Long examinationRecordId);
}
